#include "shape7.h"

namespace Tetris{

Shape7::Shape7() : Shape() {
	//  0000     
	//  0##0
	//  0##0
	//  0000
	this->p_arr[5] = true;
	this->p_arr[6] = true;
	this->p_arr[9] = true;
	this->p_arr[10] = true;
}

void Shape7::Transform(){
	// do nothing.
}

Shape* Shape7::Clone() const{
	Shape7* p = new Shape7();
	p->row = this->row;
	p->col = this->col;
	int len = p->row * p->col;
	for(int i=0;i<len;++i)
		p->p_arr[i] = this->p_arr[i];
	return p;
}

void Shape7::Restore(const Shape* p_shape){
	const Shape7* p = dynamic_cast<const Shape7*>(p_shape);
	this->row = p->row;
	this->col = p->col;
	int len = this->row * this->col;
	for(int i=0;i<len;++i)
		this->p_arr[i] = p->p_arr[i];
}

}